package com.hezhiqin.springshiro.user;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @program: homeWork
 * @description:
 * @author: hezhiqin
 * @create: 2020-03-08 20:29
 */
@Controller
public class UserController {

    @GetMapping("/hello")
    @ResponseBody
    public String hello(String s){
        return  s;
    }


    @GetMapping("/testThymeleaf")
    public String thymeleaf(Model s){
        s.addAttribute("user","hezhiqin");
        return  "test";
    }


    @GetMapping("/add")
    public String add(Model s){
        s.addAttribute("user","hezhiqin");
        return  "test";
    }


    @GetMapping("/update")
    public String update(Model s){
        s.addAttribute("user","hezhiqin");
        return  "test";
    }

}
